﻿package com.ease.model.type
{
	import com.ease.common.enums.ValuableEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.ease.model.type.SpatialFeatureType;

	[Bindable]
	[RemoteClass(alias="com.ease.model.type.SpatialFeatureType")]

	public class SpatialFeatureType extends Enum
	{
		/* static init */
		{ initEnum(SpatialFeatureType); }

		/* Constants */
		public static const Point:SpatialFeatureType = new SpatialFeatureType("Point", 3001, 2, 0, "01");
		public static const Line:SpatialFeatureType = new SpatialFeatureType("Line", 3002, 2, 0, "02");
		public static const Polygon:SpatialFeatureType = new SpatialFeatureType("Polygon", 3003, 2, 0, "03");

		private var _value:int;
		private var _dimension:int;
		private var _linearReferencing:int;
		private var _geometryType:String;

		/*public*/ function SpatialFeatureType(name:String=null ,value:int=0 ,dimension:int=0 ,linearReferencing:int=0 ,geometryType:String=null) {
			super.name = name;
			this._value = value;
			this._dimension = dimension;
			this._linearReferencing = linearReferencing;
			this._geometryType = geometryType;
		}

		public function get value():int  { return this._value; }
		public function get dimension():int  { return this._dimension; }
		public function get linearReferencing():int  { return this._linearReferencing; }
		public function get geometryType():String  { return this._geometryType; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(SpatialFeatureType);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):SpatialFeatureType {
			return SpatialFeatureType(Enum.get(SpatialFeatureType, constantName, caseSensitive));
		}
	}
}